/***************************************************************************
 *   The Motorola Freeware Assembler                              
 *
 *   table12.h --- Instruction table for HC12
 *
 ***************************************************************************/
 
/*
 * Keep this table in alphabetical order!
 */
struct oper table[] = {
	/*
	*MNE     CLASS   BASE    CYCLES 
	*/
	{"aba",  P2INH,  0x06,  1 },
	{"abx",  TLEA,   0x1A,  2 },
	{"aby",  TLEA,   0x19,  2 },
	{"adca", GEN,    0x89, 2},
	{"adcb", GEN,    0xC9, 2},
	{"adda", GEN,    0x8B, 2},
	{"addb", GEN,    0xCB, 2},
	{"addd", LONGIMM,0xC3, 2},
	{"anda", GEN,    0x84, 2},
	{"andb", GEN,    0xC4, 2},
	{"andcc",IMM,    0x10, 1},
	{"asl",  GRP2,   0x68, 3},
	{"asla", INH,    0x48, 1},
	{"aslb", INH,    0x58, 1},
	{"asld", INH,    0x59, 1},
	{"asr",  GRP2,   0x67, 3},
	{"asra", INH,    0x47, 1},
	{"asrb", INH,    0x57, 1},
	
	{"bcc",  REL,    0x24, 3},
	{"bclr", SETCLR, 0x0D, 4},
	{"bcs",  REL,    0x25, 3},
	{"beq",  REL,    0x27, 3},
	{"bge",  REL,    0x2C, 3},
	{"bgnd", INH,    0x00, 2},
	{"bgt",  REL,    0x2E, 3},
	{"bhi",  REL,    0x22, 3},
	{"bhs",  REL,    0x24, 3},
	{"bita", GEN,    0x85, 1},
	{"bitb", GEN,    0xC5, 1},
	{"bkgnd",INH,    0x00, 2},
	{"ble",  REL,    0x2F, 3},
	{"blo",  REL,    0x25, 3},
	{"bls",  REL,    0x23, 3},
	{"blt",  REL,    0x2D, 3},
	{"bmi",  REL,    0x2B, 3},
	{"bne",  REL,    0x26, 3},
	{"bpl",  REL,    0x2A, 3},
	{"bra",  REL,    0x20, 3},
	{"brclr",BTB,    0x0F, 4},
	{"brn",  REL,    0x21, 1},
	{"brset",BTB,    0x0E, 4},
	{"bset", SETCLR, 0x0C, 4},
	{"bsr",  REL,    0x07, 4},
	{"bvc",  REL,    0x28, 3},
	{"bvs",  REL,    0x29, 3},
	
	{"call", SETCLR, 0x4B, 10},
	{"cba",  P2INH,  0x17, 1},
	{"cbnz", BPM,    0x04, 3},
	{"clc",  CCRC,   0x10, 1},
	{"cli",  CCRC,   0x10, 1},
	{"clr",  GRP2,   0x69, 3},
	{"clra", INH,    0x87, 1},
	{"clrb", INH,    0xC7, 1},
	{"clv",  CCRC,   0x10, 1},
	{"cmpa", GEN,    0x81, 1},
	{"cmpb", GEN,    0xC1, 1},
	{"cmpd", LONGIMM,0x8C, 2},
	{"cmps", LONGIMM,0x8F, 3},
	{"cmpx", LONGIMM,0x8E, 2},
	{"cmpy", LONGIMM,0x8D, 2},
	{"com",  GRP2,   0x61, 3},
	{"coma", INH,    0x41, 1},
	{"comb", INH,    0x51, 1},
	{"cpd",  LONGIMM,0x8C, 2},
	{"cps",  LONGIMM,0x8F, 3},
	{"cpx",  LONGIMM,0x8E, 2},
	{"cpy",  LONGIMM,0x8D, 2},
	
	{"daa",  P2INH,  0x07, 1},
	{"dbeq", BPM,    0x04, 3},
	{"dbne", BPM,    0x04, 3},
	{"dec",  GRP2,   0x63, 3},
	{"deca", INH,    0x43, 1},
	{"decb", INH,    0x53, 1},
	{"des",  TLEA,   0x1B, 2},
	{"dex",  INH,    0x09, 1},
	{"dey",  INH,    0x03, 1},
	
	{"ediv", INH,    0x11, 12},
	{"edivs",P2INH,  0x14, 14},
	{"emacs",P2EXT,  0x12, 8},
	{"emaxd",P2INON, 0x1A, 4},
	{"emaxm",P2INON, 0x1E, 4},
	{"emind",P2INON, 0x1B, 4},
	{"eminm",P2INON, 0x1F, 4},
	{"emul", INH,    0x13, 6},
	{"emuls",P2INH,  0x13, 6},
	{"eora", GEN,    0x88, 2},
	{"eorb", GEN,    0xC8, 2},
	{"etbl", P2INON, 0x3F, 6},
	{"exg",  RTOR,   0xB7, 1},
	
	{"fdiv", P2INH,  0x11, 11},
	
	{"ibeq", BPM,    0x04, 3},
	{"ibne", BPM,    0x04, 3},
	{"idiv", P2INH,  0x10, 11},
	{"idivs",P2INH,  0x15, 11},
	{"inc",  GRP2,   0x62, 3},
	{"inca", INH,    0x42, 1},
	{"incb", INH,    0x52, 1},
	{"ins",  TLEA,   0x1B, 1},
	{"inx",  INH,    0x08, 1},
	{"iny",  INH,    0x02, 1},
	
	{"jmp",  GRP2,   0x05, 3},
	{"jsr",  NOIMM,  0x17, 4},
	
	{"lbcc", P2REL,  0x24, 4},
	{"lbcs", P2REL,  0x25, 4},
	{"lbeq", P2REL,  0x27, 4},
	{"lbge", P2REL,  0x2C, 4},
	{"lbgt", P2REL,  0x2E, 4},
	{"lbhi", P2REL,  0x22, 4},
	{"lbhs", P2REL,  0x24, 4},
	{"lble", P2REL,  0x2F, 4},
	{"lblo", P2REL,  0x25, 4},
	{"lbls", P2REL,  0x23, 4},
	{"lblt", P2REL,  0x2D, 4},
	{"lbmi", P2REL,  0x2B, 4},
	{"lbne", P2REL,  0x26, 4},
	{"lbpl", P2REL,  0x2A, 4},
	{"lbra", P2REL,  0x20, 4},
	{"lbrn", P2REL,  0x21, 4},
	{"lbsr", NOIMM,  0x17, 3},
	{"lbvc", P2REL,  0x28, 4},
	{"lbvs", P2REL,  0x29, 4},
	{"lda",  GEN,    0x86, 2},
	{"ldaa", GEN,    0x86, 2},
	{"ldab", GEN,    0xC6, 2},
	{"ldad", LONGIMM,0xCC, 2},
	{"ldb",  GEN,    0xC6, 2},
	{"ldd",  LONGIMM,0xCC, 2},
	{"lds",  LONGIMM,0xCF, 2},
	{"ldx",  LONGIMM,0xCE, 2},
	{"ldy",  LONGIMM,0xCD, 2},
	{"leas", INDEXED,0x1B, 2},
	{"leax", INDEXED,0x1A, 2},
	{"leay", INDEXED,0x19, 2},
	{"lsl",  GRP2,   0x68, 3},
	{"lsla", INH,    0x48, 1},
	{"lslb", INH,    0x58, 1},
	{"lsld", INH,    0x59, 1},
	{"lsr",  GRP2,   0x64, 3},
	{"lsra", INH,    0x44, 1},
	{"lsrb", INH,    0x54, 1},
	{"lsrd", INH,    0x49, 1},
	
	{"maxa", P2INON, 0x18, 4},
	{"maxm", P2INON, 0x1C, 4},
	{"mem",  INH,    0x01, 4},
	{"mina", P2INON, 0x19, 4},
	{"minm", P2INON, 0x1D, 4},
	{"movb", MVIB,   0x0B, 4},
	{"movw", MVIW,   0x03, 4},
	{"mul",  INH,    0x12, 2},
	
	{"neg",  GRP2,   0x60, 3},
	{"nega", INH,    0x40, 1},
	{"negb", INH,    0x50, 1},
	{"nop",  INH,    0xA7, 1},
	
	{"ora",  GEN,    0x8A, 2},
	{"oraa", GEN,    0x8A, 2},
	{"orab", GEN,    0xCA, 2},
	{"orb",  GEN,    0xCA, 2},
	{"orcc", IMM,    0x14, 1},
	
	{"psha", INH,    0x36, 2},
	{"pshb", INH,    0x37, 2},
	{"pshbyte",MVIB, 0x0B, 4},
	{"pshc", INH,    0x39, 2},
	{"pshd", INH,    0x3B, 2},
	{"pshword",MVIW, 0x03, 4},
	{"pshx", INH,    0x34, 2},
	{"pshy", INH,    0x35, 2},
	{"pula", INH,    0x32, 3},
	{"pulb", INH,    0x33, 3},
	{"pulbyte",MVIB, 0x0B, 4},
	{"pulc", INH,    0x38, 3},
	{"puld", INH,    0x3A, 3},
	{"pulword",MVIW, 0x03, 4},
	{"pulx", INH,    0x30, 3},
	{"puly", INH,    0x31, 3},
	
	{"rev",  P2INH,  0x3A, 5},
	{"revw", P2INH,  0x3B, 5},
	{"rol",  GRP2,   0x65, 3},
	{"rola", INH,    0x45, 1},
	{"rolb", INH,    0x55, 1},
	{"ror",  GRP2,   0x66, 3},
	{"rora", INH,    0x46, 1},
	{"rorb", INH,    0x56, 1},
	{"rtc",  INH,    0x0A, 11},
	{"rti",  INH,    0x0B, 10},
	{"rts",  INH,    0x3D, 5},
	
	{"sba",  P2INH,  0x16, 1},
	{"sbca", GEN,    0x82, 2},
	{"sbcb", GEN,    0xC2, 2},
	{"sec",  CCRC,   0x14, 1},
	{"sei",  CCRC,   0x14, 1},
	{"sev",  CCRC,   0x14, 1},
	{"sex",  RTOR,   0xB7, 1},
	{"sta",  NOIMM,  0x4A, 2},
	{"staa", NOIMM,  0x4A, 2},
	{"stab", NOIMM,  0x4B, 2},
	{"stad", NOIMM,  0x4C, 2},
	{"stb",  NOIMM,  0x4B, 2},
	{"std",  NOIMM,  0x4C, 2},
	{"stop", P2INH,  0x3E, 10},
	{"sts",  NOIMM,  0x4F, 2},
	{"stx",  NOIMM,  0x4E, 2},
	{"sty",  NOIMM,  0x4D, 2},
	{"suba", GEN,    0x80, 2},
	{"subb", GEN,    0xC0, 2},
	{"subd", LONGIMM,0x83, 2},
	{"swi",  INH,    0x3F, 14},
	{"swpb", RTOR,   0xB7, 1},
	
	{"tab",  P2INH,  0x0E, 2},
	{"tap",  TTFR,   0xB7, 1},
	{"tba",  P2INH,  0x0F, 2},
	{"tbeq", BPM,    0x04, 3},
	{"tbl",  P2INON, 0x3D, 2},
	{"tbne", BPM,    0x04, 3},
	{"tfr",  RTOR,   0xB7, 1},
	{"tpa",  TTFR,   0xB7, 1},
	{"trap", P2EXT,  0x12, 8},
	{"tst",  GRP2,   0xE7, 3},
	{"tsta", INH,    0x97, 1},
	{"tstb", INH,    0xD7, 1},
	{"tsx",  TTFR,   0xB7, 1},
	{"tsy",  TTFR,   0xB7, 1},
	{"txs",  TTFR,   0xB7, 1},
	{"tys",  TTFR,   0xB7, 1},
	
	{"wai",  INH,    0x3E, 14},
	{"wav",  P2INH,  0x3C, 8},
	{"wavr", INH,    0x3C, 8},
	
	{"xgdx", TTFR,   0xB7, 1},
	{"xgdy", TTFR,   0xB7, 1}
};
